﻿using System;
using System.ComponentModel.DataAnnotations;
using XStudio.XCRF.Data.Business.Archieve;

namespace XStudio.XCRF.Data.Entities.LabCheck
{
    /// <summary>
    /// 实验室检查信息
    /// </summary>
    public class LabCheck : BaseEntity<LabCheck>, IArchieve
    {
        /// <summary>
        /// CRF主表记录ID
        /// </summary>
        [ForeignKey("CRF")]
        public Guid? CRFID { get; set; }
        /// <summary>
        /// CRF主表记录
        /// </summary>
        public virtual CRF CRF { get; set; }
        /// <summary>
        /// 送检时间
        /// </summary>
        [ArchieveField]
        [Required]
        [Column(TypeName = "date")]
        public DateTime Time { get; set; }

        #region 血沉
        [ArchieveField]
        public decimal? ESR{ get; set; }
        #endregion 血沉
        
        #region 血常规
        [ArchieveField]
        public decimal? RBC { get; set; }
        [ArchieveField]
        public decimal? PLT { get; set; }
        [ArchieveField]
        public decimal? Hb { get; set; }
        [ArchieveField]
        public decimal? WBC { get; set; }
        [ArchieveField]
        public decimal? NEU { get; set; }
        [ArchieveField]
        public decimal? LYM { get; set; }
        [ArchieveField]
        public decimal? MNC { get; set; }
        #endregion 血常规

        #region 尿常规
        [ArchieveField]
        public byte? PRO { get; set; }
        [ArchieveField]
        public byte? GLU { get; set; }
        //[ArchieveField]
        //public byte? LEU1 { get; set; }
        //[ArchieveField]
        //public byte? LEU2 { get; set; }
        //[ArchieveField]
        //public byte? BLD1 { get; set; }
        //[ArchieveField]
        //public byte? BLD2 { get; set; }
        [ArchieveField]
        public byte? LEU { get; set; }
        [ArchieveField]
        public byte? BLD { get; set; }
        #endregion 尿常规

        #region 粪常规
        [ArchieveField]
        public byte? BXB { get; set; }
        [ArchieveField]
        public byte? FB { get; set; }
        #endregion 粪常规

        #region 肝肾功能
        [ArchieveField]
        public decimal? ALT { get; set; }
        [ArchieveField]
        public decimal? AST { get; set; }
        [ArchieveField]
        public decimal? BUN { get; set; }
        [ArchieveField]
        public decimal? SCr { get; set; }
        [ArchieveField]
        public decimal? ZDHS { get; set; }
        [ArchieveField]
        public decimal? JHDHS { get; set; }
        [ArchieveField]
        public decimal? BDB { get; set; }
        [ArchieveField]
        public decimal? JXLSM { get; set; }
        [ArchieveField]
        public decimal? GAXZTM { get; set; }
        [ArchieveField]
        public decimal? ZDGC { get; set; }
        [ArchieveField]
        public decimal? NS { get; set; }
        #endregion 肝肾功能

        #region 肿瘤标志物
        [ArchieveField]
        public decimal? CEA { get; set; }
        [ArchieveField]
        public decimal? CA50 { get; set; }
        [ArchieveField]
        public decimal? CA199 { get; set; }
        [ArchieveField]
        public decimal? CA724 { get; set; }
        [ArchieveField]
        public decimal? CA242 { get; set; }
        #endregion 肿瘤标志物

        #region 免疫功能相关
        [ArchieveField]
        public decimal? NK { get; set; }
        [ArchieveField]
        public decimal? CD3 { get; set; }
        [ArchieveField]
        public decimal? CD4 { get; set; }
        [ArchieveField]
        public decimal? CD8 { get; set; }
        [ArchieveField]
        public decimal? CD4_CD8 { get; set; }
        #endregion 免疫功能相关

        #region 特殊检查
        /// <summary>
        /// 1正常 2异常无临床意义 3异常有临床意义 4未查
        /// </summary>
        //[ArchieveField]
        //public byte? ECGType { get; set; }
        /// <summary>
        /// 心电图
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        public string ECG { get; set; }
        /// <summary>
        /// 心电图时间
        /// </summary>
        [ArchieveField]
        public DateTime? ECGTime { get; set; }
        /// <summary>
        /// 肠镜
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        public string Enteroscope { get; set; }
        /// <summary>
        /// 肠镜时间
        /// </summary>
        [ArchieveField]
        public DateTime? EnteroscopeTime { get; set; }
        /// <summary>
        /// B超
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        public string BUltra { get; set; }
        /// <summary>
        /// B超时间
        /// </summary>
        [ArchieveField]
        public DateTime? BUltraTime { get; set; }
        /// <summary>
        /// 胸部CT
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        public string ChestCT { get; set; }
        /// <summary>
        /// 胸部CT时间
        /// </summary>
        [ArchieveField]
        public DateTime? ChestCTTime { get; set; }
        /// <summary>
        /// 上腹部CT
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        public string AbdomenCT { get; set; }
        /// <summary>
        /// 上腹部CT时间
        /// </summary>
        [ArchieveField]
        public DateTime? AbdomenCTTime { get; set; }
        /// <summary>
        /// 盆腔CT
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        public string PelvicCT { get; set; }
        /// <summary>
        /// 盆腔CT时间
        /// </summary>
        [ArchieveField]
        public DateTime? PelvicCTTime { get; set; }
        /// <summary>
        /// 盆腔MRI
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        public string PelvicMRI { get; set; }
        /// <summary>
        /// 盆腔CT时间
        /// </summary>
        [ArchieveField]
        public DateTime? PelvicMRITime { get; set; }
        /// <summary>
        /// PetCT
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        public string PetCT { get; set; }
        /// <summary>
        /// 其他时间
        /// </summary>
        [ArchieveField]
        public DateTime? PetCTTime { get; set; }
        #endregion 特殊检查

    }
}
